package com.ruoyi.system.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.TMusicInfoMapper;
import com.ruoyi.system.domain.TMusicInfo;
import com.ruoyi.system.service.ITMusicInfoService;

/**
 * 音乐列Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-09-24
 */
@Service
public class TMusicInfoServiceImpl implements ITMusicInfoService 
{
    @Autowired
    private TMusicInfoMapper tMusicInfoMapper;

    /**
     * 查询音乐列
     * 
     * @param musicId 音乐列主键
     * @return 音乐列
     */
    @Override
    public TMusicInfo selectTMusicInfoByMusicId(Long musicId)
    {
        return tMusicInfoMapper.selectTMusicInfoByMusicId(musicId);
    }

    /**
     * 查询音乐列列表
     * 
     * @param tMusicInfo 音乐列
     * @return 音乐列
     */
    @Override
    public List<TMusicInfo> selectTMusicInfoList(TMusicInfo tMusicInfo)
    {
        return tMusicInfoMapper.selectTMusicInfoList(tMusicInfo);
    }

    /**
     * 新增音乐列
     * 
     * @param tMusicInfo 音乐列
     * @return 结果
     */
    @Override
    public int insertTMusicInfo(TMusicInfo tMusicInfo)
    {
        tMusicInfo.setCreateTime(DateUtils.getNowDate());
        return tMusicInfoMapper.insertTMusicInfo(tMusicInfo);
    }

    /**
     * 修改音乐列
     * 
     * @param tMusicInfo 音乐列
     * @return 结果
     */
    @Override
    public int updateTMusicInfo(TMusicInfo tMusicInfo)
    {
        tMusicInfo.setUpdateTime(DateUtils.getNowDate());
        return tMusicInfoMapper.updateTMusicInfo(tMusicInfo);
    }

    /**
     * 批量删除音乐列
     * 
     * @param musicIds 需要删除的音乐列主键
     * @return 结果
     */
    @Override
    public int deleteTMusicInfoByMusicIds(Long[] musicIds)
    {
        return tMusicInfoMapper.deleteTMusicInfoByMusicIds(musicIds);
    }

    /**
     * 删除音乐列信息
     * 
     * @param musicId 音乐列主键
     * @return 结果
     */
    @Override
    public int deleteTMusicInfoByMusicId(Long musicId)
    {
        return tMusicInfoMapper.deleteTMusicInfoByMusicId(musicId);
    }
}
